#include "NewMapMenu.h"
#include "WidgetText.h"

NewMapMenu::NewMapMenu(Application* app) : Menu(app)
{
    setBackgroundImage("newmap_menu.png");
    mapName = new WidgetTextField(250,100,300,25);
    okButton = new WidgetButton(this, 250,500,146,40,"Ok",30);
    cancelButton = new WidgetButton(this, 404,500,146,40,"Cancel",30);

    addWidget(mapName);
    addWidget(okButton);
    addWidget(cancelButton);

    addWidget(new WidgetText(150,100, "Map name", sf::Color(100,100,100,255), 25));
}

void NewMapMenu::onButtonPressed(WidgetButton* button)
{
    if(button == cancelButton)
        close();
}

NewMapMenu::~NewMapMenu()
{
    //dtor
}
